package adv_pre;

import java.util.Arrays;

public class ArrayTest {

	public static void main(String[] args) {
		// 数组的拷贝
		int[] a1 = { 1, 3, 5, 6, 7, 9 };
		int a2[] = new int[30];
		// for(int i=0;i<a1.length;i++){
		// a2[i]=a1[i];
		// }
		int[] a3 = Arrays.copyOf(a1, 25);

		System.arraycopy(a1, 0, a2, 0, a1.length);
		System.out.println(Arrays.toString(a2));
	}

}
